﻿package 
{
	import app.view.components.card.CardManager;
	import flash.display.Sprite;
	import flash.events.Event;
	import app.ApplicationFacade;
	
	/**
	 * ГИС г. Снежинска
	 * 
	 * @author firsoff maxim, tel: +79222345364, skype: maxim.firsoff
	 */
	public class Main extends Sprite 
	{
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			var facade:ApplicationFacade = ApplicationFacade.getInstance();
            facade.startup( this );
			
			
			var test:CardManager = new CardManager();
			addChild(test);
			test.x = stage.stageWidth / 2 - test.width / 2;
			test.y = stage.stageHeight / 2 - test.height / 2;
		}
		
	}
	
}
